import request from '@/utils/request'
import upload from '@/utils/upload'

export default {
	// 查admin收款信息
	getAdminBank() {
		return request({
			url: `/ws/bankCard/system/bankCard`,
			method: 'get',
		})
	},
	
	//绑定上级
	bindSuperiorByInviteCode(inviteCode) {
		return request({
			url: `/ws/userProfile/bindSuperiorByInviteCode/${inviteCode}`,
			method: 'get',
		})
	},

	// 微信小程序登录
	mpWxLogin(data) {
		return request({
			url: `/ws/appletUser/wxlogin`,
			method: 'get',
			headers: {
				isToken: false
			},
			data
		})
	},

	// 微信小程序登录
	mpMobileLogin(data) {
		return request({
			url: `/ws/appletUser/wx-app-mobile-new`,
			method: 'get',
			headers: {
				isToken: false
			},
			data
		})
	},


	// 用户注销
	logOff() {
		return request({
			url: `/ws/userProfile/logOff`,
			method: 'get',
		})
	},

	/**
	 * 微信手机号登录
	 */
	wx_Phone_Login(params) {
		return request({
			url: `/ws/appletUser/wx-app-mobile-new`,
			method: 'get',
			data: params
		})
	},

	// 验证码登录
	smsLogin(data) {
		return request({
			url: '/ws/appUser/sms/login',
			method: 'get',
			headers: {
				isToken: false
			},
			data: data
		})
	},

	/**
	 * 微信登录
	 */
	wx_Login(params) {
		return request({
			url: `/ws/appletUser/wxlogin`,
			method: 'get',
			data: params
		})
	},

	//注册
	registerUser(data) {
		return request({
			url: `/ws/appUser/logon`,
			method: 'post',
			headers: {
				isToken: false
			},
			data
		})
	},

	forgetPayPassword(data) {
		return request({
			url: `/ws/userPassword/forgetPayPassword`,
			method: 'get',
			data
		})
	},

	//签到列表
	signList(params) {
		return request({
			url: `/admin/signLog/appList`,
			method: 'get',
			data: params
		})
	},

	//每日签到
	signToday() {
		return request({
			url: `/admin/signLog/signToday`,
			method: 'get',
		})
	},

	// 查询自己的店铺
	appgetstores() {
		return request({
			url: `/mall/stores/appgetstores`,
			method: 'get',
		})
	},

	// 交易记录
	recordsList(params) {
		return request({
			url: `/exchange/records/list`,
			method: 'GET',
			data: params
		})
	},

	//交易所团队统计
	recordsTeamNum(params) {
		return request({
			url: `/exchange/records/teamNum`,
			method: 'GET',
			data: params
		})
	},

	//身份证验证支付 支付宝
	placeBusinesspay(params) {
		return request({
			url: `/action/user/businesspay`,
			method: 'get',
			data: params
		})
	},

	// 实名认证
	realnameauthentication(data) {
		return request({
			url: `/app/user/realnameauthentication`,
			method: 'post',
			data
		})
	},

	//交易所信息同步
	placeLoginPlace(params) {
		return request({
			url: `/business/place/addPace`,
			method: 'post',
			data: params
		})
	},

	//提交仓单
	placeReceiveOrder(params) {
		return request({
			url: `/business/place/receiveOrder`,
			method: 'post',
			data: params
		})
	},

	//判断余额
	placeifbalance(params) {
		return request({
			url: `/business/place/ifbalance`,
			method: 'GET',
			data: params
		})
	},

	// 查看当前用户的交易次数
	getCangdanNum(params) {
		return request({
			url: `/exchange/records/getCangdanNum`,
			method: 'GET',
			data: params
		})
	},

	// 新增银行卡
	addBank(data) {
		return request({
			url: `/ws/bankCard`,
			method: 'post',
			data
		})
	},

	// 解绑银行卡
	unbinding(data) {
		return request({
			url: `/ws/bankCard/remove`,
			method: 'get',
			data
		})
	},

	//置换列表
	displaceList(params) {
		return request({
			url: `/displace/log/applist`,
			method: 'get',
			data: params
		})
	},

	// 我的收藏列表
	collectionList(params) {
		return request({
			url: `/ws/mallCollect/list`,
			method: 'get',
			data: params
		})
	},

	//地址---删除
	addressRemove(params) {
		return request({
			url: `/ws/mallAddress/remove`,
			method: 'get',
			params
		})
	},

	//设置 默认收货
	addressUpdateDefault(params) {
		return request({
			url: `/ws/mallAddress/update/default`,
			method: 'get',
			data: params
		})
	},

	//新增地址
	addAddress(params) {
		return request({
			url: `/ws/mallAddress`,
			method: 'post',
			data: params
		})
	},

	// 地址修改
	addressModify(params) {
		return request({
			url: `/ws/mallAddress`,
			method: 'put',
			data: params
		})
	},

	//地址列表
	addressList(params) {
		return request({
			url: `/ws/mallAddress/list`,
			method: 'get',
			data: params
		})
	},

	// 团队列表
	getTeamList(params) {
		return request({
			url: `/ws/userProfile/getTeamList`,
			method: 'get',
			data: params
		})
	},

	//团队请求
	getTeamNum(params) {
		return request({
			url: `/ws/userProfile/getTeamNum`,
			method: 'get',
			data: params
		})
	},

	// 新增提现记录
	withdrawRecord(data) {
		return request({
			url: `/ws/withdraw`,
			method: 'post',
			data
		})
	},

	// 提现记录列表
	withdrawRecordList(data) {
		return request({
			url: `/ws/withdraw/list`,
			method: 'get',
			data
		})
	},

	// 用户银行卡列表
	bankCardList(data) {
		return request({
			url: `/ws/bankCard/list`,
			method: 'get',
			data
		})
	},

	// 查询收支日志列表
	lncomeList(data) {
		return request({
			url: `/ws/userRich/income/list`,
			method: 'get',
			data
		})
	},

	// 获取当前用户资产信息
	userRichInfo() {
		return request({
			url: `/ws/userRich/getUserRich`,
			method: 'get',
		})
	},

	// 用户扫码转账
	moneyMoneySend(data) {
		return request({
			url: `/app/money/moneySend/${data.userName}/${data.moneyTypeId}/${data.amount}/${data.payPassword}`,
			method: 'get',
		})
	},

	//用户扫码给店铺付款
	storesStorePay(data) {
		return request({
			url: `/mall/stores/storePay/${data.amount}/${data.payment}/${data.userName}/${data.payPassword}/${data.isService}/${data.platform}`,
			method: 'get',
			data: data
		})
	},

	//我的黄金总计
	myGoldTotal() {
		return request({
			url: `/mall/productOrders/goldTotal`,
			method: 'get',
		})
	},

	//申请置换 资产
	displace(data) {
		return request({
			url: `/displace/log`,
			method: 'post',
			data
		})
	},

	// 分红统计
	getDividend() {
		return request({
			url: `/special/serviceDividend/userService`,
			method: 'get',
		})
	},

	// 修改用户信息
	updateUserInfo(data) {
		return request({
			url: '/ws/userProfile/updateUserInfo',
			method: 'post',
			data: data
		})
	},

	//修改支付密码
	updatePayPassword(params) {
		return request({
			url: `/ws/userPassword/updatePayPassword/${params.newPayPassword}`,
			method: 'get',
			data: params
		})
	},

	// 获取会员等级
	levelsList(data) {
		return request({
			url: `/ws/syslevel/list`,
			method: 'get',
			data
		})
	},
}